package com.hqd.ch03.bean;

import com.hqd.ch03.v9.factory.FactoryBean;

public class UserFactoryBean implements FactoryBean<User> {
    @Override
    public Class<?> getObjectType() {
        return User.class;
    }

    @Override
    public User getObject() {
        User user = new User();
        user.setAge(100);
        user.setName("李四");
        return user;
    }

    @Override
    public String toString() {
        return "我是自定义FactoryBean";
    }
}
